package com.bamboo.framework.common.qiniu.kodo.config;

import com.qiniu.storage.UploadManager;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: GuoQing
 * @Date: 2019/1/30 10:20
 * @description
 */
@Data
@Configuration
public class BucketProperties {

  /**
   * 桶名称
   */
  @Value("${qiniu.kodo.bucket.name:}")
  private String name;
  /**
   * 域名
   */
  @Value("${qiniu.kodo.bucket.domain:}")
  private String domain;

  /**
   * token
   */
  private  String upToken;

  /**
   * 区域
   */
  @Value("${qiniu.kodo.bucket.regional}")
  private  String regional;

  private UploadManager uploadManager;

  public  String getUrl(String fileName){
    return this.domain+"/"+fileName;
  }

}
